package thread;

public class MyThread1 implements Runnable{
    private Task task1;
    public MyThread1(Task task){
        task1=task;
    }

    @Override
    public void run() {
        try {
            task1.methodA();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        String a="123";
        String b="123";
        String c=new String("123");
        System.out.println(a.equals(b));
        System.out.println(a==b);
        System.out.println(b==c);
    }
}
